import http from '@/util/http'

export function delMusic (id) {
  return http.delete(`/musics?id=${id}`)
}

export function musicList (search, current, pageSize) {
  return http.post(`/music/get?pageNo=${current}&pageSize=${pageSize}`, search)
}

export function addMusic (data) {
  return http.post('/musics', data)
}

export function updateMusic (data) {
  return http.put('/musics', data)
}

export function delMusicByPath (path) {
  return http.delete(`/music/delete?path=${path}`)
}
